; "Hello World" program. Compile with gcc -o prog prog.ll

@.msg_1 = internal constant [7 x i8] c"hello \00"
@.msg_2 = internal constant [7 x i8] c"world\0A\00"

declare i32 @printf(i8*, ...)

define i32 @main()
{
        %str1 = getelementptr [7 x i8]* @.msg_1 , i64 0, i64 0
        call i32 (i8*, ...)* @printf ( i8* %str1 )
        %str2 = getelementptr [7 x i8]* @.msg_2 , i64 0, i64 0
        call i32 (i8*, ...)* @printf ( i8* %str2 )
        ret i32 0
}
